{extend name="./template/default/m/pub/uc.html" /}
{block name="seo"}
<title>{$site_name}-我的书架</title>
{/block}
{block name="main"}
<div class="app_body">
    <div class="app_topTabBlock">
        <span class="public_AddFloatRight rightButton" id="success" style="display: none;">完成</span>
        <span class="public_AddFloatRight rightButton" id="administration">管理</span>
    </div>
    <div class="app_listBlock app_deleteMargin" id="content">
        <div class="app_listBlock_con">
            <ul class="app_deletePaddingBottom" id="list">
                {volist name="books" id="vo"}
                <li class="li2">
                    <a href="/m/{$book_ctrl}/{$vo.param}">
                        <div class="leftImage2">
                            <img src="{$vo.cover}">
                        </div>
                        <div class="rightBlock">
                            <span class="rightBlock_title">{$vo.articlename}</span>
                            <span class="rightBlock_name">{$vo.cate.cate_name}</span>
                            <span class="rightBlock_con  rightBlock_con2">
                                <span class="con">
                                    <span class="spanLi">{$vo.author}</span>
                                </span>
                                <span class="spanLi Time">{$vo.lastupdate|date='Y-m-d H:i:s'}</span>
                                <span class="rightJustTime"
                                    onclick="javascript:window.location.href='/m/{$book_ctrl}/{$vo.param}'">继续阅读</span>
                            </span>
                        </div>
                    </a>
                    <span class="deleteBlock" onclick="delfavor({$vo.articleid})"></span>
                </li>
                {/volist}
            </ul>
        </div>
    </div>
    <div class="app_pageBlock">
        <ul class="pager">
            {if $page.last_page > 1}
            {if $page.current_page == 1}
            <li class="disabled"><span>«</span></li>
            {else/}
            <li><a href="/m/bookshelf?page={$page.current_page-1}{$param}">«</a></li>
            {/if}

            {if $page.current_page == $page.last_page}
            <li class="disabled"><span>»</span></li>
            {else/}
            <li><a href="/m/bookshelf?page={$page.current_page+1}{$param}">»</a></li>
            {/if}
            {/if}
        </ul>
    </div>
</div>
{/block}
{block name="js"}
<script>
    function delfavor(articleid) {
        $.ajax({
            url:'/m/delfavors',
            type:'post',
            data: {
                articleid: articleid
            },
            success:function (res) {
                if (res.err == 0) {
                    layer.msg(res.msg, {icon: 1,time: 1000,shade:0.3}, function () {
                        location.reload()
                    })
                } else {
                    layer.msg(res.msg, {icon: 1,time: 1000,shade:0.3})
                }
            }
        })
    }
</script>
{/block}